Skip to content

docs: clarify ResourceFetcher class docstring#1087

Merged
msluszniak merged 2 commits intomainfrom
docs/resource-fetcher-class-docstring
Apr 24, 2026
Merged

docs: clarify ResourceFetcher class docstring#1087
msluszniak merged 2 commits intomainfrom
docs/resource-fetcher-class-docstring

Conversation

@msluszniak
Copy link
Copy Markdown
Member

@msluszniak msluszniak commented Apr 22, 2026

Summary

Both the file-level docstring and the ResourceFetcher class docstring listed pauseFetching, resumeFetching, cancelFetching, getFilesTotalSize, listDownloadedFiles, listDownloadedModels, and deleteResources as if they were available on the class. They aren't — those methods only exist on the concrete adapter implementations (ExpoResourceFetcher, BareResourceFetcher).

This PR rewrites both docstrings to:

  • Describe ResourceFetcher as a static-only entry point that delegates to a configured ResourceFetcherAdapter.
  • Direct readers to the adapter packages when they want storage-management utilities.

Pure docs change — no behavior change.

Issue

Addresses item 4 of #1086.

Test plan

  • yarn typecheck passes
  • npx eslint packages/react-native-executorch/src/utils/ResourceFetcher.ts clean
  • npx prettier --check packages/react-native-executorch/src/utils/ResourceFetcher.ts clean
  • No source changes — only the file-level and class-level JSDoc blocks were modified

The file-level and class-level docstrings listed pauseFetching,
resumeFetching, cancelFetching, getFilesTotalSize, listDownloadedFiles,
listDownloadedModels, and deleteResources as available on
ResourceFetcher. Those methods only exist on the concrete adapter
implementations (ExpoResourceFetcher, BareResourceFetcher).

Rewrite both docstrings to describe ResourceFetcher as the static
entry point that delegates to a configured adapter, and direct
readers to the adapter packages when they want the storage-management
utilities.

Refs #1086 (item 4).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@msluszniak msluszniak self-assigned this Apr 22, 2026
@msluszniak msluszniak added the documentation Improvements or additions to documentation label Apr 22, 2026
@msluszniak msluszniak requested a review from chmjkb April 22, 2026 11:14
Comment thread packages/react-native-executorch/src/utils/ResourceFetcher.ts Outdated
It duplicated the class docstring and caused the original drift flagged
in #1086. The class-level block is self-contained.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@msluszniak msluszniak merged commit 6c672de into main Apr 24, 2026
4 checks passed
@msluszniak msluszniak deleted the docs/resource-fetcher-class-docstring branch April 24, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants